package com.glsc.ngateway.common.api.flowable.dto.task.config;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.*;


/**
 * @Author: tangyf
 * @Date: 2021/12/1
 * @Desc: 流程节点可编辑字段表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class ProcessEditConfigDto {

    @ApiModelProperty(value = "流程类型标识")
    private String processType;

    @ApiModelProperty(value = "流程节点标识，对应flowable的taskDefinitionKey")
    private String nodeType;

    @ApiModelProperty(value = "流程节点标识中文名称")
    private String nodeName;

    @ApiModelProperty(value = "配置是否生效，Y/N")
    private String activated;

    @ApiModelProperty(value = "节点可以编辑字段，默认为必填字段")
    private String editFields = "";

    @ApiModelProperty(value = "节点可以编辑字段列表，如：productBriefDto.registerNo,productBriefDto.registerConfirmDate,flowableFormData.entrustAccountName")
    private List<String> editFieldList = new ArrayList<>();

    @ApiModelProperty(value = "节点可以编辑字段列表productBriefDto:registerNo,registerConfirmDate")
    private Map<String, Set<String>> editFieldWithDtoMap = new HashMap<>();

    @ApiModelProperty(value = "节点可以选填编辑字段，多个英文逗号分割")
    private String optionalEditFields = "";

    @ApiModelProperty(value = "节点可以选填编辑字段，如：productBriefDto.registerNo,productBriefDto.registerConfirmDate,flowableFormData.entrustAccountName")
    private List<String> optionalEditFieldList = new ArrayList<>();

    @ApiModelProperty(value = "节点选填字段列表productBriefDto:registerNo,registerConfirmDate")
    private Map<String, Set<String>> optionalEditFieldWithDtoMap = new HashMap<>();

    @ApiModelProperty(value = "节点可以退回至上一步，yesno字典 Y/N")
    private String nodeCanRollback;

    @ApiModelProperty(value = "节点可以查看附件类型列表")
    private List<String> docTypeViewList = new ArrayList<>();

    @ApiModelProperty(value = "节点可以修改附件类型列表")
    private List<String> docTypeEditList = new ArrayList<>();

    @ApiModelProperty(value = "节点任务描述，节点操作说明")
    private String taskDescription;
}
